
<?php
$this->breadcrumbs = array(
    'Quản lý slideshow'
);
?>


<div class="page-header position-relative">
    <h1>
        Quản lý slideshow
    </h1>

</div><!--/.page-header-->
<div>
    <div class="pull-right">
        <div class="btn-group span2">
        </div>

        <div class="widget-toolbar">
            <a href="<?php echo Yii::app()->createAbsoluteUrl($parentUrl . '/create'); ?>" role="button" class="white" data-toggle="modal"  title="Add new language">
                <i class="icon-plus"></i>
            </a>
        </div>

    </div>
</div>
<div class="row-fluid">
    <div class="table-header">
        Tất cả hình ảnh trên slide
    </div>
    <table id="sample-table-2" class="table table-striped table-bordered table-hover">
        <thead>
            <tr>
                <th class="center">
                    STT
                </th>
                <th class="center">
                    Thứ tự hiện thị
                </th>
                <th>Hình ảnh</th>
                <th class="hidden-480">Trạng thái</th>
                <th>Hành động</th>
            </tr>
        </thead>

        <tbody>
            <?php $i = 1;
            foreach ($items as $value) :
                ?>
                <tr>
                    <td><?= $i ?></td>
                    <td class="center"><?= $value['order'] ?></td>

                    <td>
                        <a href="" data-rel="colorbox" class="ace-thumbnails" title="">
                            <img src="<?php echo Yii::app()->baseUrl; ?>/timthumb.php?src=<?php echo Yii::app()->baseUrl; ?>/data/image/slide/<?php echo $value['name'] ?>&h=100&w=100" />
                        </a>
                    </td>
                    <td class="hidden-480">
    <?php if ($value['active'] == 0) : ?>
                            <a class="label label-success" onclick="deactive_status(<?php echo $value['id']; ?>)" title="Deactive Status" >
                                Ẩn
                            </a>

    <?php else : ?>
                            <a class="label label-default" onclick="active_status(<?php echo $value['id']; ?>)" title="Active Status" >
                                Hiện
                            </a>
    <?php endif; ?>
                    </td>
                    <td class="td-actions">
                        <div class="hidden-phone visible-desktop action-buttons">
                            <a class="green" href="<?php echo Yii::app()->createAbsoluteUrl($parentUrl . '/update', array('id' => $value->id)); ?>">
                                <i class="icon-pencil bigger-130"></i>
                            </a>
                            <a class="red" title="Delete Image" href="<?php echo Yii::app()->createAbsoluteUrl($parentUrl . '/delete', array('id' => $value->id)); ?>">
                                <i class="icon-trash bigger-130"></i>
                            </a>                            
                        </div>

                        <div class="hidden-desktop visible-phone">
                            <div class="inline position-relative">
                                <button class="btn btn-minier btn-yellow dropdown-toggle" data-toggle="dropdown">
                                    <i class="icon-caret-down icon-only bigger-120"></i>
                                </button>

                                <ul class="dropdown-menu dropdown-icon-only dropdown-yellow pull-right dropdown-caret dropdown-close">


                                    <li>
                                        <a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
                                            <span class="red">
                                                <i class="icon-trash bigger-120"></i>
                                            </span>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </td>
                </tr>
                <?php $i++;
            endforeach;
            ?>
        </tbody>
    </table>
</div>